#! /bin/sh
############################################################
#
# Invoke Procedure from Oracle DataBase Package with SQLPLUS
#
###########################################################

logfile=importproduct.log

echo -e "#---------------------- PL/SQL Process Start ------------------------#" >> ${logfile}
echo "SqlPlus Execute PL/SQL Procedure ,Import Product Data from Temp Table  To EIM Table " >> ${logfile}
echo  Start Execute Time: $(date +"%Y-%m-%d %T")  >> ${logfile}

Procedure="jy_crm_cx_prod_tmp_pkg.main"
DBUserName=SIEBEL
DBPassword=SIEBEL
TNSName=SIEBELTEST

export $PATH=/siebel/app/db/11.2.0/bin:$PATH

sqlplus ${DBUserName}/${DBPassword}@${TNSName} <<EOF

    var    out_param1  varchar2;
    var	   out_param2  varchar2;

    call ${Procedure}(:out_param1,:out_param2);
    exit;


EOF



echo  End Execute Time: $(date +"%Y-%m-%d %T")   >> ${logfile}
echo -e "#---------------------- PL/SQL Process End ------------------------#" >> ${logfile}


